<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="download">下载</button>
</body>
<script>
    document.getElementById('download').onclick = function(){
        // 创建表单
        const form = document.createElement('form');
        form.action = 'https://itcast-1255651667.cos.ap-chengdu.myqcloud.com/20220106133642.csv';
        form.method = 'get';
        form.style.display = 'none';
        // 插入到网页中
        document.body.appendChild(form);
        form.submit(); // 发送请求
        document.body.removeChild(form); // 发送完清除掉
    }
</script>
</html>